package com.ldan.controller;

import com.alibaba.fastjson.JSON;
import com.ldan.dto.ResponseDto;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * 试验接口，返回一个普通报文表明身份
 */
@Controller
public class HelloController {

    @GetMapping(value = "/hello")
    public @ResponseBody String hello() {
        return JSON.toJSONString(new ResponseDto("0", "Success", "Hello, I'm 2000."));
    }

}
